<template>
    <div class="container">
        <div v-if="floatText.projectType == 'JSGC'" class="wubianxing-b"></div>
        <div v-else class="wubianxing-r"></div>
        <span class="floating-text" v-if="floatText.projectType === 'JSGC'">建设</span>
        <span class="floating-text" v-else>采购</span>
        <span class="title-text">
            {{ floatText.projectName}}
        </span>
    </div>
</template>

<script>
  export default {
    name: 'tagleft',
    props: {
      floatText: {
        type: Object,
        default: ()=>{
          return {
            projectName:'',projectType:''
          }
        }
      }
    },
    components: {
    },
    data() {
      return {
        // floatText: '工程',
      }
    },
    methods: {
    },
    mounted() {
    }
  }



</script>

<style lang="scss" scoped>


.container{
   position: relative;
   width: 100%;
   height: 100%;

   justify-content: center;

}
.floating-text {
  position: absolute;
  top: 50%;
  left: 9%;
  font-size: 12px;
  transform: translate(-50%, -50%);
  /* 其他样式，例如字体大小、颜色等 */
}

.wubianxing-b {
   position: absolute;
   top: -10%;
   left: 5%;
   width: 6%;
   height: 120%;

      background-color: #3498db;
      clip-path: polygon(
        100% 25%, 
        100% 75%, 
        50% 100%, 
        0% 75%, 
        0% 25%
      );
      transform: rotate(-90deg);
}

.wubianxing-r {
   position: absolute;
   top: -10%;
   left: 5%;
   width: 6%;
   height: 120%;

      background-color: #D75F57;
      clip-path: polygon(
        100% 25%, 
        100% 75%, 
        50% 100%, 
        0% 75%, 
        0% 25%
      );
      transform: rotate(-90deg);
}


.title-text {
//   position: absolute;
  margin-left: 30%;
  /* 其他样式，例如字体大小、颜色等 */
}
</style>